<?php

// $Id$


require_once(TANGRA_MAIN_DIR.'form/fields/text/form_field_text_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/hidden/form_field_hidden_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/integer_limited/form_field_integer_limited_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/integer/form_field_integer_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/guardable_form_view.class.php');


class Category_Form_View extends Guardable_Form_View {
	function __construct(Form &$form) {
		parent::__construct($form);

		$f_title = $form->get_field('title');
		$f_title_view = new Form_Field_Text_View($form->get_name().'_'.$f_title->get_name(), $f_title);
		$this->add_field_view('title', $f_title_view);

		$f_parent = $form->get_field('parent');
		$f_parent_view = new Form_Field_Hidden_View($form->get_name().'_'.$f_parent->get_name(), $f_parent);
		$this->add_field_view('parent', $f_parent_view);

		$f_hid = $form->get_field('hid');
		$f_hid_view = new Form_Field_Text_View($form->get_name().'_'.$f_hid->get_name(), $f_hid);
		$this->add_field_view('hid', $f_hid_view);

		$f_ordering = $form->get_field('ordering');
		$f_ordering_view = new Form_Field_Integer_Limited_View($form->get_name().'_'.$f_ordering->get_name(), $f_ordering);
		$this->add_field_view('ordering', $f_ordering_view);
	}
}